package com.yyg.wiki.util;

import java.io.Serializable;
/**
 *
 * 功能描述:获取当前远程ip的。进行线程获取，每一个线程可以获取一个IP地址
 *
 * @param:
 * @return:
 * @auther: 17878
 * @date: 2021/8/9 15:47
 */
public class RequestContext implements Serializable {

    private static ThreadLocal<String> remoteAddr = new ThreadLocal<>();

    public static String getRemoteAddr() {
        return remoteAddr.get();
    }

    public static void setRemoteAddr(String remoteAddr) {
        RequestContext.remoteAddr.set(remoteAddr);
    }

}